package club.cearnach.api.dao;

import club.cearnach.entity.Actor;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

/**
 * @author 阮胜
 * @date 2018/5/12 14:21
 */
public interface IActorDao extends JpaRepository<Actor, Integer> {
    Optional<Actor> findByName(String name);

    Optional<Actor> findByPersonId(Integer id);

    List<Actor> findAllByOrderByUpdateDateDesc(Pageable pageable);
}
